package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbGoodClickMapper;
import com.ruoyi.system.domain.TbGoodClick;
import com.ruoyi.system.service.ITbGoodClickService;

/**
 * 商品查看累加Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbGoodClickServiceImpl implements ITbGoodClickService 
{
    @Autowired
    private TbGoodClickMapper tbGoodClickMapper;

    /**
     * 查询商品查看累加
     * 
     * @param goodId 商品查看累加主键
     * @return 商品查看累加
     */
    @Override
    public TbGoodClick selectTbGoodClickByGoodId(Long goodId)
    {
        return tbGoodClickMapper.selectTbGoodClickByGoodId(goodId);
    }

    /**
     * 查询商品查看累加列表
     * 
     * @param tbGoodClick 商品查看累加
     * @return 商品查看累加
     */
    @Override
    public List<TbGoodClick> selectTbGoodClickList(TbGoodClick tbGoodClick)
    {
        return tbGoodClickMapper.selectTbGoodClickList(tbGoodClick);
    }

    /**
     * 新增商品查看累加
     * 
     * @param tbGoodClick 商品查看累加
     * @return 结果
     */
    @Override
    public int insertTbGoodClick(TbGoodClick tbGoodClick)
    {
        return tbGoodClickMapper.insertTbGoodClick(tbGoodClick);
    }

    /**
     * 修改商品查看累加
     * 
     * @param tbGoodClick 商品查看累加
     * @return 结果
     */
    @Override
    public int updateTbGoodClick(TbGoodClick tbGoodClick)
    {
        return tbGoodClickMapper.updateTbGoodClick(tbGoodClick);
    }

    /**
     * 批量删除商品查看累加
     * 
     * @param goodIds 需要删除的商品查看累加主键
     * @return 结果
     */
    @Override
    public int deleteTbGoodClickByGoodIds(Long[] goodIds)
    {
        return tbGoodClickMapper.deleteTbGoodClickByGoodIds(goodIds);
    }

    /**
     * 删除商品查看累加信息
     * 
     * @param goodId 商品查看累加主键
     * @return 结果
     */
    @Override
    public int deleteTbGoodClickByGoodId(Long goodId)
    {
        return tbGoodClickMapper.deleteTbGoodClickByGoodId(goodId);
    }
}
